﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrator/EHTAdmin.Master" AutoEventWireup="true" CodeBehind="EHTModul.aspx.cs" Inherits="EHTWebsiteProject.Administrator.EHTModul" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MenuModulContent" runat="server">
 <div class="MenuSub-Left" >
        <table>
            <tr>
                <td> <img alt="" src="../images/EHTgiaodien/icon-48-module.png" width="48px" height="48px" /></td>               
                <td><asp:Label ID="lbModul" runat="server" Text="Quản lý modul " ></asp:Label></td>                
            </tr>
        </table>           
    </div>
    <div class="MenuSub-Right" align="right">
        <table style="height:60px">
            <tr>
                <td valign="middle">
                    <div class="add-edit-del">  
                        <a href="EHTModullAdd.aspx">
                            <img alt="" src="../images/icon-32-upload.jpeg" width="32px" height="32px" class="imagboder" /><br />
                            <asp:Label ID="lbUpload" runat="server" Text="Upload"></asp:Label>
                        </a>                                                  
                    </div>
                </td>
                <td valign="middle">
                    <div class="add-edit-del">  
                            <asp:ImageButton ID="ImaTat" 
                                ImageUrl="~/images/EHTgiaodien/icon-32-unpublish.png" runat="server" 
                                width="32px" height="32px" class="imagboder" onclick="ImaTat_Click"  />                     
                            <br />
                            <asp:Label ID="lbTat" runat="server" Text="Tắt"></asp:Label>                       
                    </div>
                </td>
                <td valign="middle">
                    <div class="add-edit-del">   
                            <asp:ImageButton ID="ImgBat" 
                                ImageUrl="~/images/EHTgiaodien/icon-32-publish.png" runat="server" width="32px" 
                                height="32px" class="imagboder" onclick="ImgBat_Click"  />                     
                            <br />                                                 
                            <asp:Label ID="lbBat" runat="server" Text="Bật"></asp:Label>                       
                    </div>
                </td>                                             
                <td valign="middle">
                    <div class="add-edit-del">
                         <asp:ImageButton ID="ImgDel" ImageUrl="~/images/EHTgiaodien/icon-32-delete.png" 
                                runat="server" width="32px" height="32px" CssClass="imagboder" 
                                OnClientClick="return confirm('Are you sure you want to delete?');" 
                             onclick="ImgDel_Click" />                                                     
                            <br />
                            <asp:Label ID="lbDel" runat="server" Text="Xóa"></asp:Label>       
                    </div>
                </td>

                <td valign="middle">
                    <div class="add-edit-del">
                         <asp:ImageButton ID="ImgEdit" ImageUrl="~/images/EHTgiaodien/icon-32-edit.png" 
                                runat="server" width="32px" height="32px" CssClass="imagboder" onclick="ImgEdit_Click" 
                                />  <br />                                                                      
                            <asp:Label ID="lbEdit" runat="server" Text="Sửa"></asp:Label> 
                    </div>
                </td>
                <td valign="middle">
                    <div class="add-edit-del">
                        <a href="EHTModulUI.aspx">
                            <img alt="" src="../images/EHTgiaodien/icon-32-new.png" width="32px" height="32px" class="imagboder" /><br />
                            <asp:Label ID="lbAddNew" runat="server" Text="Thêm mới"></asp:Label>
                        </a>
                    </div>
                </td>

                 <td valign="middle">
                    <div class="add-edit-del">
                        <a href="#">
                            <img alt="" src="../images/EHTgiaodien/icon-32-help.png" width="32px" height="32px" class="imagboder" /><br />
                            <asp:Label ID="lbHelp" runat="server" Text="Trợ giúp"></asp:Label>
                        </a>
                    </div>
                </td>                
            </tr>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentMain" runat="server">
     <asp:Literal ID="ltrErorr" runat="server"></asp:Literal>
    
    <div style="padding-top:5px;">
        <asp:Panel ID="plModulVN" runat="server">
             <asp:Repeater ID="rpModul" runat="server" onitemcommand="rpModul_ItemCommand" 
            onitemdatabound="rpModul_ItemDataBound" >              
        <HeaderTemplate>
            <table ID="table" border="0" cellpadding="0" cellspacing="0" >
                 <thead>
                    <tr>
                                     <th>
                                        <asp:CheckBox ID="ckAll" runat="server" AutoPostBack="true" OnCheckedChanged="CheckAll" />
                                    </th>                         
                                                                      
                                    <th>
                                        <asp:Label ID="lbTenModul" runat="server" Text=" Tên modul"></asp:Label>                            
                                    </th>
                                    
                                    <th>
                                        <asp:Label ID="lbNhom" runat="server" Text=" Nhóm "></asp:Label>                             
                                    </th> 
                                     <th>
                                        <asp:Label ID="lbTrangThai" runat="server" Text=" Trạng thái "></asp:Label>                             
                                    </th> 
                                     <th>
                                        <asp:Label ID="lbSapXep" runat="server" Text=" Thứ tự "></asp:Label> 
                                         <asp:ImageButton ID="ibtnSaveAll" ImageUrl="~/images/save_all.jpg" Height="20"
                                        Width="20" OnClientClick="return confirm('Bạn muốn lưu ?');" runat="server" BorderStyle="None"
                                        CommandName="save_all" />                                                                    
                                    </th>                                                                                                            
                    </tr>
                 </thead>
                 <tbody>            
        </HeaderTemplate>
        <ItemTemplate>
                 <tr>
                        <td>
                            <asp:CheckBox ID="ckMenu"  runat="server" />
                            <asp:Label ID="lbDelID" runat="server" Visible="false" Text='<%#Eval("ModulID")%>'></asp:Label>
                        </td>
                                              
                        <td >
                        <a class="a" href='EHTModullAdd.aspx?ModulID=<%#Eval("ModulID")%>'>
                            <%#Eval("TenModul")%>  
                        </a>
                                                     
                        </td>
                        <td>
                            <%#Eval("Nhom")%>  
                        </td>
                       
                         <td >
                            <asp:Label ID="lbStatus" runat="server" Text='<%#Eval("TrangThai")%>' Visible="false"></asp:Label>
                            <asp:Image ID="ImagStatus" ImageUrl="~/images/tick.png" runat="server" />
                        </td> 
                        <td>
                             <asp:TextBox ID="txtNumberOfOrder" Width="30" runat="server" Text='<%#Eval("SapXep")%>'></asp:TextBox>
                    <asp:ImageButton Width="16" Height="16" ID="btnSaveNumberOfOrder" CommandName="change_number_of_order"
                        CommandArgument='<%#Eval("ModulID") %>' ImageUrl="~/images/save.jpg" runat="server" />
                        </td>                        
                    </tr>
        </ItemTemplate>
        <FooterTemplate>
                </tbody>
             </table>
        </FooterTemplate>
    </asp:Repeater>
        </asp:Panel>
        <asp:Panel ID="plModulOther" runat="server">
             <asp:Repeater ID="rpModulOther" runat="server" onitemcommand="rpModulOther_ItemCommand" 
            onitemdatabound="rpModulOther_ItemDataBound" >              
        <HeaderTemplate>
            <table ID="table" border="0" cellpadding="0" cellspacing="0" >
                 <thead>
                    <tr>
                                     <th>
                                        <asp:CheckBox ID="ckAll" runat="server" AutoPostBack="true" OnCheckedChanged="CheckAllOther" />
                                    </th>                         
                                                                      
                                    <th>
                                        <asp:Label ID="lbTenModul" runat="server" Text="Modul name"></asp:Label>                            
                                    </th>
                                    
                                    <th>
                                        <asp:Label ID="lbNhom" runat="server" Text=" Group "></asp:Label>                             
                                    </th> 
                                     <th>
                                        <asp:Label ID="lbTrangThai" runat="server" Text=" Status "></asp:Label>                             
                                    </th> 
                                     <th>
                                        <asp:Label ID="lbSapXep" runat="server" Text=" Number "></asp:Label> 
                                         <asp:ImageButton ID="ibtnSaveAll" ImageUrl="~/images/save_all.jpg" Height="20"
                                        Width="20" OnClientClick="return confirm('Bạn muốn lưu ?');" runat="server" BorderStyle="None"
                                        CommandName="save_all" />                                                                    
                                    </th>                                                                                                            
                    </tr>
                 </thead>
                 <tbody>            
        </HeaderTemplate>
        <ItemTemplate>
                 <tr>
                        <td>
                            <asp:CheckBox ID="ckMenu"  runat="server" />
                            <asp:Label ID="lbDelID" runat="server" Visible="false" Text='<%#Eval("ModulID")%>'></asp:Label>
                        </td>
                                              
                        <td >
                        <a class="a" href='EHTModullAdd.aspx?ModulID=<%#Eval("ModulID")%>'>
                            <%#Eval("TenModulOther")%>  
                        </a>
                                                     
                        </td>
                        <td>
                            <%#Eval("Nhom")%>  
                        </td>
                       
                         <td >
                            <asp:Label ID="lbStatus" runat="server" Text='<%#Eval("TrangThai")%>' Visible="false"></asp:Label>
                            <asp:Image ID="ImagStatus" ImageUrl="~/images/tick.png" runat="server" />
                        </td> 
                        <td>
                             <asp:TextBox ID="txtNumberOfOrder" Width="30" runat="server" Text='<%#Eval("SapXep")%>'></asp:TextBox>
                    <asp:ImageButton Width="16" Height="16" ID="btnSaveNumberOfOrder" CommandName="change_number_of_order"
                        CommandArgument='<%#Eval("ModulID") %>' ImageUrl="~/images/save.jpg" runat="server" />
                        </td>                        
                    </tr>
        </ItemTemplate>
        <FooterTemplate>
                </tbody>
             </table>
        </FooterTemplate>
    </asp:Repeater>
        </asp:Panel>
    </div> 
</asp:Content>
